home *** CD-ROM | disk | FTP | other *** search
- unit Unit1;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Button2: TButton;
- Label1: TLabel;
- Label2: TLabel;
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
- {$R HINTS.RES}
-
- procedure LoadFormHints(aForm: TForm);
- var
- i: Integer;
- resID: Longint;
- begin
- for i := 0 to aForm.ComponentCount - 1 do begin
- {Check for > 0 since some components may not have hints}
- resID := aForm.Components[i].Tag;
- if resID > 0 then begin
- TControl(aForm.Components[i]).Hint := LoadStr(resID);
- end;
- end;
- end;
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- LoadFormHints(Self);
- end;
-
- end.
-
-
-